//region createMouseEvent
function createMouseEvent(type:string,params?:MouseEventInit):MouseEvent{
	try{
		return new MouseEvent(type,params);
	}catch{
		const event=document.createEvent('MouseEvent');
		params=params||{};
		event.initMouseEvent(
			type,
			params.bubbles||false,
			params.cancelable||false,
			window,
			0,
			params.screenX||0,
			params.screenY||0,
			params.clientX||0,
			params.clientY||0,
			params.ctrlKey||false,
			params.altKey||false,
			params.shiftKey||false,
			params.metaKey||false,
			params.button||0,
			params.relatedTarget||null,
		);
		return event;
	}
}
//endregion
export {
	createMouseEvent,
};